<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" />
		<meta name="format-detection" content="telephone=no, address=no, email=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="misapplication-tap-highlight" content="no" />
		<meta name="HandheldFriendly" content="true" />
		<link rel="stylesheet" href="css/mui.min.css" type="text/css" charset="utf-8" />
		<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
		<link rel="stylesheet" href="css/product.css" type="text/css" charset="utf-8" />
		<style>
			p {
				margin-bottom: 0px;
			}
			
			.mui-table-view .mui-table-view-cell {
				margin-bottom: 0.14rem;
				background: #fff;
				margin-left: -0.24rem;
				margin-right: -0.24rem;
			}
			
			.mui-table-view .mui-table-view-cell p {
				line-height: 1;
				color: #666;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav mui-header">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">经销商管理</h1>
		</header>

		<div class="mui-content">
			<div>
				<div class="mui-select">
					<select id="jd" style="height:0.65rem;line-height:0.65rem;padding:0px;border-radius: 0;margin: 0px;">
						<option value="">请选择产品</option>
						<option value="1">小刀</option>
						<option value="2">二锅头</option>
						<option value="3">异种品</option>
						<option value="4">伊力特</option>
					</select>
				</div>

				<div class="mui-indexed-list-search mui-input-row mui-search " style="margin-top:0.28rem">
					<input type="search" class="mui-input-clear mui-indexed-list-search-input" placeholder="搜索经销商姓名" style="height:0.65rem;line-height:0.65rem;padding:0px;border-radius: 0;">
				</div>

				<div>
					<button type="button" id="addWay" class="mui-btn mui-btn-primary mui-btn-full">添加渠道</button>
				</div>

			</div>

			<div class="jxsList">
				<p style="line-height:1.15rem">上级渠道：</p>
				<ul class="mui-table-view mui-table-view-chevron">
					<li class="mui-table-view-cell" id="personInfo">
						<p class="mui-navigate-right">张世超,158956895658</span>
					</li>

				</ul>

				<p style="line-height:1.01rem">下级渠道：</p>
				<ul class="mui-table-view mui-table-view-chevron">
					<li class="mui-table-view-cell" id="personInfo">
						<p class="mui-navigate-right">张世超,158956895658</span>
					</li>
					<li class="mui-table-view-cell" id="personInfo">
						<p class="mui-navigate-right">张世超,158956895658</span>
					</li>

				</ul>

			</div>
		</div>
		<footer class="mui-bar mui-bar-footer">
			<nav class="mui-bar mui-bar-tab" style="font-weight: bold;">
				<a class="mui-tab-item mui-active" id="main-main" data-title="主页">
					<span class="pic-icon pic-icon-home"></span>
					<span class="mui-tab-label">主页</span>
				</a>
				<a class="mui-tab-item" id="main-inout" data-title="出入库">
					<span class="pic-icon pic-icon-inout"></span>
					<span class="mui-tab-label">出入库</span>
				</a>
				<a class="mui-tab-item" id="main-jxs" data-title="经销商">
					<span class="pic-icon pic-icon-jxs"></span>
					<span class="mui-tab-label">经销商</span>
				</a>
				<a class="mui-tab-item" id="main-center" data-title="个人中心">
					<span class="pic-icon pic-icon-person"></span>
					<span class="mui-tab-label">个人中心</span>
				</a>
			</nav>
		</footer>

	</body>
	<script src="js/resize.js"></script>
	<script src="js/mui.min.js"></script>
	<script src="js/redirect.js"></script>
	<script type="text/javascript">
		var jxs = document.querySelectorAll('.mui-table-view-cell');
		for(var i = 0; i < jxs.length; i++) {
			var temp = jxs[i];
			temp.addEventListener('tap', function() {
				//打开关于页面
				mui.openWindow({
					url: 'jxsInfo.html',
					id: 'jxsInfolist',
					extras: {
						//自定义扩展参数，可以用来处理页面间传值
					},
					waiting: {
						autoShow: true, //自动显示等待框，默认为true
						title: '正在加载...', //等待对话框上显示的提示内容
					}
				});
			});

		}

		mui.init({
			preloadPages: [{
				url: 'jxsInfoRegister.html',
				id: 'jxsInfoRegister',
				styles: {}, //窗口参数
				extras: {}, //自定义扩展参数
				subpages: [{}, {}] //预加载页面的子页面
			}],
			preloadLimit: 5 //预加载窗口数量限制(一旦超出,先进先出)默认不限制
		});

		mui.plusReady(function() {
			var mainPage = plus.webview.getWebviewById('jxsInfoRegister');
					console.log(mainPage);
			var toPage = function() {
				//使用定时器的原因：
				//可能执行太快，main页面loaded事件尚未触发就执行自定义事件，此时必然会失败
				var id = setInterval(function() {
					clearInterval(id);
					mui.fire(mainPage, 'show', null);
					mainPage.show("pop-in");
				}, 20);
			};

			/*添加渠道*/
			var addWay = document.getElementById("addWay");

			addWay.addEventListener('tap', function() {
				toPage();
			})
		})
	</script>

</html>